﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Sites/Man/Main.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Templates_My_Commitment_Default" %>
<%@ Register TagPrefix="uc" TagName="Footprint" Src="~/UserControls/FootprintSaving.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphContent" Runat="Server">

    <asp:PlaceHolder id="noData" visible="false" runat="server">   
        <cex:RoundedBox ID="titleBox" Color="Grey" RoundedBottom="true" RoundedTop="true" runat="server">
            <h2>My Commitment</h2>            
        </cex:RoundedBox>
        <div class="spacer" style="border-top:3px solid #c2bcb6; background-color:#ffffff"></div>   
        <cex:RoundedBox ID="RoundedBox1" Color="White" RoundedTop="false" RoundedBottom="true" runat="server">
            <div style="padding:10px;">
                <ul class="col first">
                    <li>
                        <p>You have not yet made any commitments. Please visit the ‘<asp:HyperLink ID="lnkActionPlan" Text="My Action Plan" runat="server" />’ page where you can choose from a range of recommended actions which will help you to reduce your carbon footprint.</p>
                    </li>
                </ul>
            </div>
        </cex:RoundedBox>
    </asp:PlaceHolder>

    <asp:ListView ID="listCommitmentDates" DataSourceID="dsDates" DataKeyNames="Date" runat="server">
        <LayoutTemplate>
            <asp:PlaceHolder ID="itemPlaceHolder" runat="server" />
        </LayoutTemplate>
        
        <ItemTemplate>
            <cex:RoundedBox ID="titleBox" Color="Grey" RoundedBottom="true" RoundedTop="true" runat="server">
                <h2><asp:LinkButton ID="btnSelect" CommandName="Select" Text="My Commitment" runat="server"/></h2>            
                <asp:LinkButton ID="btnDate" runat="server" Text='<%# Eval("Date", "{0:dd MMMM yyyy}") %>' CssClass="titleRightArea" />
            </cex:RoundedBox>
            <div class="spacer" style="border-top:3px solid #c2bcb6; background-color:#ffffff"></div>   
        </ItemTemplate>
        
        <SelectedItemTemplate>
            <cex:RoundedBox ID="titleBox" Color="Grey" RoundedBottom="false" runat="server">
                <h2>My Commitments</h2>            
                <asp:Label ID="Label3" runat="server" Text='<%# Eval("Date", "{0:dd MMMM yyyy}") %>' CssClass="titleRightArea" />
            </cex:RoundedBox>
            <div class="spacer" style="border-top:3px solid #c2bcb6; background-color:#ffffff"></div>   
            <cex:RoundedBox ID="contentBox" Color="White" RoundedBottom="true" RoundedTop="false" runat="server">    
                <asp:Panel ID="pnlCommitments" CssClass="myCommitment"  runat="server">
                    <div class="colB">
                    
                    <ul class="col first">
                            <li style="color:#ffffff"><uc:Footprint ID="footprint" runat="server" /></li>
                            <%--<li class="info"><asp:Label ID="lblName" Font-Bold="true" Text='<%#User.Identity.User.DisplayName %>' runat="server" /></li>
                            <li class="data" style="border-top: 2px solid white; padding-top:5px">Outstanding footprint: <asp:Label ID="lblOutstandingFootprint" runat="server" Text="00.00kg CO<sub>2</sub>e"/></li>
                            <li class="data">Outstanding footprint: <asp:Label ID="lblOutstandingCost" runat="server" Text="£00.00"/></li>
                            <li class="data">Carbon credit required:  <asp:Label ID="lblCredit" runat="server" Text="00.00"/></li>--%>
                            <li class="base">
                                <%--<asp:ImageButton ID="btnPrint" CssClass="buttons floatLeft"  ImageUrl="~/Sites/Man/img/btn_print-white.gif" ToolTip="Print" runat="server"  />--%>
                                <%--<asp:ImageButton ID="btnEmail" CssClass="buttons floatLeft" ImageUrl="~/Sites/Man/img/btn_email-white.gif" ToolTip="Email" runat="server"  />--%>
                                <asp:ImageButton ID="btnAdd"  CssClass="buttons floatRight" ImageUrl="~/Sites/Man/img/btn_addToActionPlan-blue.gif" OnClick="btnAdd_Click"  ToolTip="Add To Action Plan" runat="server"  />
                                <asp:ImageButton ID="btnUpdate" CssClass="buttons floatRight" ImageUrl="~/Sites/Man/img/btn_update-blue.gif" runat="server" OnClick="btnUpdate_Click" />
                            </li>
                        </ul>
                        <ul class="col middle">
                            <li><span class="statement">I commit to:</span></li>
                            <li>
                                <asp:ListView ID="listSections" OnDataBinding="listSections_DataBinding" DataKeyNames="Id" runat="server">
                                    <LayoutTemplate>
                                        <asp:PlaceHolder ID="itemPlaceHolder" runat="server" />
                                    </LayoutTemplate>
                                    
                                    <ItemTemplate>
                                        <h3><%#Eval("Name") %></h3>
                                        
                                        <asp:ListView ID="listCommitments" OnDataBinding="listCommitments_DataBinding" OnItemDataBound="listCommitments_ItemDataBound" DataKeyNames="Id" runat="server">
                                            <LayoutTemplate>
                                                <ul>
                                                    <asp:PlaceHolder ID="itemPlaceHolder" runat="server" />
                                                </ul>
                                            </LayoutTemplate>
                                            <EmptyDataTemplate>
                                                <ul>
                                                    <li>None</li>
                                                </ul>
                                            </EmptyDataTemplate>
                                            <ItemTemplate>
                                                <li class="clearfix">
                                                    <asp:CheckBox ID="cboCommitment" TextAlign="Right" runat="server" />
                                                </li>
                                            </ItemTemplate>
                                        </asp:ListView>
                                        
                                        <div class="clear"></div>
                                
                                    </ItemTemplate>
                                
                                </asp:ListView>
                            </li>
                        </ul>
                    </div>
               </asp:Panel>
            </cex:RoundedBox>
            <div class="spacer" style="border-top:3px solid #c2bcb6; background-color:#ffffff"></div>   
        </SelectedItemTemplate>

    </asp:ListView>

<acms:EventDrivenDataSource ID="dsDates" runat="server" />
<%--<cex:RoundedBox ID="titleBox2" Color="Grey" RoundedBottom="false" runat="server">
        
        
        <h2><a class=".infoPopUp" href="#"><img src="../../Sites/Man/img/grey_i.gif" border="0px" /></a>My Commitment</h2>            
        <asp:Label runat="server" Text="23 March 2008" CssClass="titleRightArea" />
    </cex:RoundedBox>--%>
    <%--<div class="spacer" style="border-top:3px solid #c2bcb6; background-color:#ffffff"></div>--%>   
    <%--<cex:RoundedBox ID="content" Color="White" RoundedBottom="true" RoundedTop="false" runat="server">    
    <asp:Panel ID="Panel1" CssClass="myCommitment"  runat="server">
        <div class="colB">
	        <ul class="col first">
	            
	                <li class="info"><asp:Label Font-Bold="true" Text="Thomas Armfelt" runat="server" /></li>
                    <li class="info"><asp:Label Text="Accounts" runat="server" /></li>
                    <li class="info" style="padding-bottom:15px"><asp:Label Text="United Kingdom" runat="server"/></li>
                    <li class="data" style="border-top: 2px solid white; padding-top:5px">Outstanding footprint: <asp:Label runat="server" Text="00.00kg"/></li>
                    <li class="data">Outstanding footprint: <asp:Label ID="Label1" runat="server" Text="£00.00"/></li>
                    <li class="data">Carbon credit required:  <asp:Label ID="Label2" runat="server" Text="00.00"/></li>
                    <li class="base">
                        <asp:ImageButton ID="ImageButton1" CssClass="buttons floatLeft"  ImageUrl="~/Sites/Man/img/btn_print-white.gif" ToolTip="Print" runat="server"  />
                        <asp:ImageButton ID="ImageButton2" CssClass="buttons floatLeft" ImageUrl="~/Sites/Man/img/btn_email-white.gif" ToolTip="Email" runat="server"  />
                        <asp:ImageButton ID="ImageButton3" CssClass="buttons floatRight" ImageUrl="~/Sites/Man/img/btn_addToActionPlan-blue.gif" ToolTip="Add To Action Plan" runat="server"  />
                        <asp:ImageButton ID="ImageButton4" CssClass="buttons floatRight" ImageUrl="~/Sites/Man/img/btn_update-blue.gif" runat="server"  />
                    </li>
                
            </ul>
            
            <ul class="col middle">
                <li class="off">I commit to:</li>
                    <h3>ENERGY</h3>
                        <ul>
                            <li><asp:CheckBox CssClass="formInput" ID="chk_Energy1" runat="server"  Checked="true" Enabled="false" /><asp:Label AssociatedControlID="chk_Energy1"  CssClass="myCommitmentItem" runat="server" Text="I commit to replace my old boiler with a high efficiency condensing boiler"/></li>
                            <li><asp:CheckBox CssClass="formInput" ID="chk_Energy2" runat="server" /><asp:Label AssociatedControlID="chk_Energy2"  CssClass="myCommitmentItem" runat="server" Text="I pledge to install double glazing on all my windows (where possible)"/></li>
                            <li><asp:CheckBox CssClass="formInput" ID="chk_Energy3" runat="server" Checked="true" Enabled="false" /><asp:Label AssociatedControlID="chk_Energy3"  CssClass="myCommitmentItem" runat="server" Text="I pledge to buy an 80mm insulating jacket for my hot water tank"/></li>
                            <li><asp:CheckBox CssClass="formInput" ID="chk_Energy4" runat="server" /><asp:Label AssociatedControlID="chk_Energy4"  CssClass="myCommitmentItem" runat="server" Text="I commit to lag my hot water pipes"/></li>
                            <li><asp:CheckBox CssClass="formInput" ID="chk_Energy5" runat="server" /><asp:Label AssociatedControlID="chk_Energy5"  CssClass="myCommitmentItem" runat="server" Text="I pledge to insulate my floors and any draughty gaps"/></li>
                        </ul>
                        <div class="clear"></div>
                    <h3>WATER</h3>
                        <ul>
                            <li>I commit to use a plug or washing up bowl when washing up by hand from now on</li>
                            <li>I commit to turn off the tap when I am brushing my teeth from now on</li>
                            <li>I commit to install low-flow tap aerators</li>
                        </ul>
                    <h3>WASTE</h3>
                        <ul>
                            <li>I commit to make sure that 3 unwanted items each year which I own are used by someone else e.g. computer, furniture and clothes</li>
                            <li>I commit to use my doorstep recycling service</li>
                            <li>I commit to use my local recycling facility</li>
                        </ul>
                    <h3>TRANSPORT</h3>
                        <ul>
                            <li>Cut down on short car journeys</li>
                            <li>Reduce short-haul flights</li>
                        </ul>
            </ul>
            <div class="clear"></div>
        </div>
        
        </asp:Panel>
   
    </cex:RoundedBox>--%>
</asp:Content>

